package com.lsa.skienna.challenge.chap11.the111105_CuttingSticks;

public class T3 {

    /**
     * @param args
     */
    public static void main(String[] args) {
        int n = 4;
        for (int i = 0; i < n; i++) {
            for (int j = 0; j < i; j++) {
                System.out.print(String.format("[%2s,%2s] ", "",""));
            }
            for (int j = i; j < n; j++) {
                System.out.print(String.format("[%2s,%2s] ", i,j));
            }
            System.out.println();
        }
        int k = 0;
        for (int ll = 1; ll <= n; ll++) {
            for (int i = 1; i <= n - ll + 1; i++) {
                int j = i + ll - 1;
                System.out.print(String.format("[%2s,%2s,%2s] ", i-1, j-1,++k));
            }
            System.out.println();
         }
    }
    
    /*
     *         for (int ll = 3; ll <= size; ll++) {
            for (int i = 1; i <= size - ll + 1; i++) {
            */
}
